#include "net.h"
#include "exmsg.h"
#include "net_plat.h"
#include "netif_pcap.h"
#include "stdtypes.h"
#include "server.h"
#include "cmd.h"
#include <stdio.h>

// LOG_LEVEL dbg_switch = LOG_LEVEL_DEBUG;

net_err_t net_init(void) {
    net_plat_init();
    exmsg_init();
    return NET_ERR_OK;
}
net_err_t net_start(void) {
    exmsg_start();
    return NET_ERR_OK;
}

net_err_t netdev_init(void) {
    netif_pcap_open();
    return NET_ERR_OK;
}

net_err_t net_cli_init(void) {
    extern cli_cmd_list user_cmd_list;
    cli_cmd_list_init(&user_cmd_list);
}

void main() {
    dbg_switch = LOG_LEVEL_DEBUG;
    net_init();
    net_start();
    netdev_init();
    net_cli_init();
    cli_service_start();
    LOG_INFO("init done\n");
    while (1) {};
}